package com.haier.a920changjingyanshidemo.activity;

import android.annotation.TargetApi;
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

import com.haier.a920changjingyanshidemo.R;

/**
 * Created by 01457215 on 2017/8/22.
 */

public class GetWaterSheBeiJianRSJActivity extends Activity implements View.OnClickListener {
    private View rsjHuanYan;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) {
        super.onCreate(savedInstanceState, persistentState);
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_getwater_shebeijian_rsj);
        rsjHuanYan = findViewById(R.id.getwater_shebeijian_rsj_huanyan);
        rsjHuanYan.setOnClickListener(this);
    }

    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.getwater_shebeijian_rsj_huanyan:
                MyDialog myDialog = new MyDialog(this, "0");
//                myDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
//                myDialog.setContentView(R.layout.dialog_huanyan);
                myDialog.show();
//                AlertDialog.Builder builder = new AlertDialog.Builder(this);
//                AlertDialog alertDialog = builder.create();
//                builder.setView(R.layout.dialog_huanyan);
////                findViewById(R.id.huanyan_goumai).setOnClickListener(new View.OnClickListener() {
////                    @Override
////                    public void onClick(View v) {
////                        Toast.makeText(getBaseContext(),"aaaa",Toast.LENGTH_SHORT).show();
////                    }
////                });
//                builder.show();
                break;
        }
    }
}
